<template>
    <div class="tab-bar">
        <div @click="changeTab(0)"><router-link to="/home/index" :class="tabIndex==0?'activate':''"><span >首页</span></router-link></div>
        <div @click="changeTab(1)"><router-link to="/home/fellow" :class="tabIndex==1?'activate':''"><span >熟人</span></router-link></div>
        <div @click="changeTab(2)">
            <router-link to="/home/index" :class="tabIndex==2?'activate plus':'plus'"><span >+</span></router-link>
        </div>
        <div @click="changeTab(3)" ><router-link to="/home/index" :class="tabIndex==3?'activate':''"><span >消息</span></router-link></div>
        <div @click="changeTab(4)"><router-link to="/home/index"  :class="tabIndex==4?'activate':''"><span>我的</span></router-link></div>
    </div>
</template>

<script>
export default {
    data(){
        return{
            tabIndex:0
        }
    },
    methods:{
        // 点击tab事件
        changeTab(index){
            this.tabIndex =
            console.log(index);
            
        }
    }
}
</script>

<style lang="less" scoped>
    .tab-bar{
        display: flex;
        height: 50px;
        line-height: 50px;
        width: 100%;
        background-color: #000;

        bottom: 0;
        left: 0;
        position: fixed;
        z-index: 999;
        div{

            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            text-align: center;
            span{
                width: 100%;
                height: 100%;
                color: #ccc;
                font-size: 16px;
            }
            .plus{

                height: 30px;
                width: 40%;
                line-height: 30px;
                text-align: center;
                display: block;
                border-top: 1px solid #fff;
                border-bottom: 1px solid #fff;
                border-left: 5px solid burlywood;
                border-right: 5px solid royalblue;
                border-radius: 5px;
            }
        }
        
    }
   

</style>